/*******************************************************************************************************

Table A5: Comparison of Average Petitions Before and After the Reform Act, for the
40 English counties

*******************************************************************************************************/

*Set directory path
cd "C:\Users\tsa23\Documents\petitions\replication files"

clear all

*read in the data with petitions attributed to the 40 counties
use dta\county_rep.dta

sort ID year

*reduce pre-reform period to 6 years
drop if year<1824
*elimiate the reform years
drop if year == 1830 | year==1831 | year==1832 

collapse (sum) petitions, by(ID treatperiod name)

label var petitions "Petitions"
label var treatperiod "After = 1, before = 0"
label var name "County name"

*export excel using "rawdata\countyraw.xlsx", firstrow(variables) replace

tabstat petitions, by(treatperiod) stats(mean sum)

ttest petitions, by(treatperiod)
